import { createBrowserRouter } from "react-router-dom";
// 首页
import App from "../App";
import Home from '../pages/home/Index'
import Index from '../pages/index/Index'
import Order from '../pages/order/Index'
import Case from '../pages/case/Index'
import Shop from '../pages/shop/Index'
// 一级
import Login from '../pages/login/Index'
import Set from '../pages/set/Index'
import Chat from '../pages/chat/Index'
import Search from '../pages/search/Index'
import Add from '../pages/add/Index'
// 列表跳转
import Detail from '../pages/detail/Index'
import Address from '../pages/address/Index'
import Card from "../pages/card/Index";
import Yue from '../pages/yue/Index'
import Price from '../pages/price/Index'
import Idea from '../pages/idea/Index'
import User from '../pages/user/Index'
import Yin from '../pages/yin/Index'
import About from '../pages/about/Index'
import Vip from '../pages/vip/Index'
import More from '../pages/more/Index'
import Pin from '../pages/pin/Index'
import Yu from '../pages/yu/Index'
import Ji from '../pages/ji/Index'
import Fu from '../pages/fu/Index'
import Doctor from '../pages/doctor/Index'
import One from '../pages/re1/Index'
import Two from '../pages/re2/Index'
import Three from '../pages/re3/Index'
import View from '../pages/view/Index'
import Loc from '../pages/loc/Index'
// 三级
import Hot from '../pages/case/hot/Index'
import News from '../pages/case/news/Index'
export const tworouter=[
    {
        path:"/home",
        element:<Home/>,
        title:'就医'
    },
    {
        path:"/index",
        element:<Index/>,
        title:'消息'
    },
    {
        path:"/order",
        element:<Order/>,
        title:'订单'
    },
    {
        path:"/case",
        element:<Case/>,
        title:'患者病例',
        children:[
            {
                path:"/case/hot",
                element:<Hot/>,
            },
            {
                path:"/case/news",
                element:<News/>,
            }
        ]
    },
    {
        path:"/shop",
        element:<Shop/>,
        title:'商城'
    }
]
export const router=createBrowserRouter([
    {
        path:"/",
        element:<App/>,
        children:tworouter

    },
    {
        path:"/login",
        element:<Login/>,

    },
    {
        path:"/set",
        element:<Set/>,

    },
    {
        path:"/chat",
        element:<Chat/>,
    },
    {
        path:"/address",
        element:<Address/>,
    },
    {
        path:"/card",
        element:<Card/>,
    },
    {
        path:"/yue",
        element:<Yue/>,
    },
    {
        path:"/price",
        element:<Price/>,
    },
    {
        path:"/idea",
        element:<Idea/>,
    },
    {
        path:"/user",
        element:<User/>,
    },
    {
        path:"/yin",
        element:<Yin/>,
    },
    {
        path:"/about",
        element:<About/>,
    },
    {
        path:"/Search",
        element:<Search/>,
    },
    {
        path:"/add",
        element:<Add/>,
    },
    {
        path:"/vip",
        element:<Vip/>,
    },
    {
        path:"/more",
        element:<More/>,
    },
    {
        path:'/pin',
        element:<Pin></Pin>
    },
    {
        path:'/yu',
        element:<Yu></Yu>
    },
    {
        path:'/ji',
        element:<Ji></Ji>
    },
    {
        path:'/fu',
        element:<Fu></Fu>
    },
    {
        path:"/detail",
        element:<Detail/>,
    },
    {
        path:"/doctor",
        element:<Doctor/>,
    },
    {
        path:"/one",
        element:<One/>,
    },
    {
        path:"/two",
        element:<Two/>,
    },
    {
        path:"/three",
        element:<Three/>,
    },
    {
        path:"/view",
        element:<View/>,
    },
    {
        path:"/loc",
        element:<Loc/>,
    }

])



export default router;